#ifndef TESTING_H
#define TESTING_H

#include <QWidget>
#include "permission.h"
#include <frmkeyboard.h>
#include <itemmanager.h>
#include <methodmanager.h>
//#include <hardwaremanager.h>
#include <QMessageBox>
#include <QtCharts/QLineSeries>
#include <QtCharts/QValueAxis>
#include <QtCharts/QChart>
#include <QtCharts/QChartView>
#include <QtCharts/QLineSeries>

QT_CHARTS_USE_NAMESPACE

namespace Ui {
class Testing;
}

class Testing : public QWidget
{
    Q_OBJECT

public:
    explicit Testing(QWidget *parent = nullptr);
    ~Testing();
    //键盘申明
    frmKeyBoard *keyboard = new frmKeyBoard();
    bool isKeyBoardShow;
    //接收选择方法页面信号的接收槽
    void nameRecevier(QString methodName);
    //管理员相关
    void hiding(bool s);
    //记录methodName
    QString methodname;
    //记录获取的barcode
    QString barcode;

    QLineSeries *series = new QLineSeries();
    QChart *chart = new QChart();
    QChartView *chartView = new QChartView(chart);
    //hide keyboard by keyboard's close button
    void hidekeyboard();

signals:
    void display(int number);
    //更新设置页面的物品信息
    void reset();

private slots:
    void on_keyboard_clicked();

    void on_start_clicked();

    void on_home_clicked();

    void on_methoddevelop_clicked();

    void on_selectmethod_clicked();

    void on_settings_clicked();

    void on_scanQRcode_clicked();

private:
    Ui::Testing *ui;

    void initStyleSheet();
};

#endif // TESTING_H
